/// userEntities : null
/// examId : 0
/// id : 136
/// examTitle : "测试指定人员考试"
/// updateTime : "2021-04-04 14:54:06"
/// createTime : "2021-04-04 14:54:06"
/// openTime : "2021-04-04 14:53:42"
/// closeTime : "2021-04-06 14:53:45"
/// selectUserList : null
/// mineId : 24
/// questionDelete : 0
/// ruleSign : 100
/// ruleJudge : 0
/// ruleMult : 0
/// ruleGap : 0
/// isAna : 1
/// topicNumber : 2
/// examType : 2
/// topicType : 2
/// examUserId : null
/// trainExam : 0
/// ruleContent : null
/// isOpen : 0
/// examTim : 30
/// examPercent : 60
/// examUid : "1af6c83312af45a682e8ea26a7d1d92f"
/// flag : false
/// qeuestWSelectList : [{"id":136,"mineId":0,"questionTitle":null,"questionUid":null,"questionDef":0,"questionDelete":0,"questContent":null,"updateDate":null,"createTime":null,"parent":0,"questionTypeList":null,"defaultQ":null}]
/// departAllSelect : false
/// departmentSelectEnityList : []

class BeanExamBean {
  dynamic userEntities;
  int examId;
  int id;
  String examTitle;
  String updateTime;
  String createTime;
  String openTime;
  String closeTime;
  dynamic selectUserList;
  int mineId;
  int questionDelete;
  int ruleSign;
  int ruleJudge;
  int ruleMult;
  int ruleGap;
  int isAna;
  int topicNumber;
  int examNumber;
  //1每日;2每月;3本次考试; 4不限次数
  int testCountModel = 4;

  ///考试期间 练习模式是否开启 0 开启  1 关闭',
  int openExercise = 0;

  ///是否结束 超出时间的为结束的 0 未结束  1已结束
  int isClose;

  /// 0 开启  1 关闭',
  int isOpen;
  int examType;
  int topicType;
  dynamic examUserId;
  int trainExam;
  dynamic ruleContent;

  //考试时间
  int examTim;
  int examPercent;
  String examUid;
  bool flag;
  List<QeuestWSelectListBean> qeuestWSelectList;
  bool departAllSelect;
  List<dynamic> departmentSelectEnityList;

  String ruleStr;
  String faceRecognition = "off";
  int faceRecognitionTime = 5;
  BeanExamBean() {}

  BeanExamBean.fromUid(String uid, int id) {
    this.examUid = uid;
    this.examId = id;
  }

  static BeanExamBean fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    BeanExamBean beanExamBeanBean = BeanExamBean();
    beanExamBeanBean.userEntities = map['userEntities'];
    beanExamBeanBean.examId = map['examId'];
    beanExamBeanBean.examNumber = map['examNumber'];
    beanExamBeanBean.id = map['id'];
    beanExamBeanBean.examTitle = map['examTitle'];
    beanExamBeanBean.updateTime = map['updateTime'];
    beanExamBeanBean.createTime = map['createTime'];
    beanExamBeanBean.openTime = map['openTime'];
    beanExamBeanBean.closeTime = map['closeTime'];
    beanExamBeanBean.selectUserList = map['selectUserList'];
    beanExamBeanBean.mineId = map['mineId'];
    beanExamBeanBean.questionDelete = map['questionDelete'];
    beanExamBeanBean.ruleSign = map['ruleSign'];
    beanExamBeanBean.ruleJudge = map['ruleJudge'];
    beanExamBeanBean.ruleMult = map['ruleMult'];
    beanExamBeanBean.ruleGap = map['ruleGap'];
    beanExamBeanBean.isAna = map['isAna'];
    beanExamBeanBean.topicNumber = map['topicNumber'];
    beanExamBeanBean.examType = map['examType'];
    beanExamBeanBean.topicType = map['topicType'];
    beanExamBeanBean.examUserId = map['examUserId'];
    beanExamBeanBean.trainExam = map['trainExam'];
    beanExamBeanBean.ruleContent = map['ruleContent'];
    beanExamBeanBean.isOpen = map['isOpen'];
    beanExamBeanBean.isClose = map['isClose'];
    beanExamBeanBean.openExercise = map['openExercise'] ?? 0;
    beanExamBeanBean.ruleStr = map['ruleStr'];
    beanExamBeanBean.testCountModel = map['testCountModel'] ?? 4;
    beanExamBeanBean.examTim = map['examTim'];
    beanExamBeanBean.examPercent = map['examPercent'];
    beanExamBeanBean.examUid = map['examUid'];
    beanExamBeanBean.flag = map['flag'];
    beanExamBeanBean.faceRecognition = map["faceRecognition"] ?? 'off';
    beanExamBeanBean.faceRecognitionTime = map["faceRecognitionTime"] ?? 5;
    beanExamBeanBean.qeuestWSelectList = List()
      ..addAll((map['qeuestWSelectList'] as List ?? [])
          .map((o) => QeuestWSelectListBean.fromMap(o)));
    beanExamBeanBean.departAllSelect = map['departAllSelect'];
    beanExamBeanBean.departmentSelectEnityList =
        map['departmentSelectEnityList'];
    return beanExamBeanBean;
  }

  Map toJson() => {
        "userEntities": userEntities,
        "examId": examId,
        "id": id,
        "examTitle": examTitle,
        "updateTime": updateTime,
        "createTime": createTime,
        "openTime": openTime,
        "closeTime": closeTime,
        "selectUserList": selectUserList,
        "mineId": mineId,
        "questionDelete": questionDelete,
        "ruleSign": ruleSign,
        "ruleJudge": ruleJudge,
        "ruleMult": ruleMult,
        "ruleGap": ruleGap,
        "isAna": isAna,
        "topicNumber": topicNumber,
        "examType": examType,
        "topicType": topicType,
        "examUserId": examUserId,
        "trainExam": trainExam,
        "ruleContent": ruleContent,
        "isOpen": isOpen,
        "examTim": examTim,
        "examPercent": examPercent,
        "examUid": examUid,
        "flag": flag,
        "qeuestWSelectList": qeuestWSelectList,
        "departAllSelect": departAllSelect,
        "departmentSelectEnityList": departmentSelectEnityList,
      };
}

/// id : 136
/// mineId : 0
/// questionTitle : null
/// questionUid : null
/// questionDef : 0
/// questionDelete : 0
/// questContent : null
/// updateDate : null
/// createTime : null
/// parent : 0
/// questionTypeList : null
/// defaultQ : null

class QeuestWSelectListBean {
  int id;
  int mineId;
  dynamic questionTitle;
  dynamic questionUid;
  int questionDef;
  int questionDelete;
  dynamic questContent;
  dynamic updateDate;
  dynamic createTime;
  int parent;
  dynamic questionTypeList;
  dynamic defaultQ;

  static QeuestWSelectListBean fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    QeuestWSelectListBean qeuestWSelectListBean = QeuestWSelectListBean();
    qeuestWSelectListBean.id = map['id'];
    qeuestWSelectListBean.mineId = map['mineId'];
    qeuestWSelectListBean.questionTitle = map['questionTitle'];
    qeuestWSelectListBean.questionUid = map['questionUid'];
    qeuestWSelectListBean.questionDef = map['questionDef'];
    qeuestWSelectListBean.questionDelete = map['questionDelete'];
    qeuestWSelectListBean.questContent = map['questContent'];
    qeuestWSelectListBean.updateDate = map['updateDate'];
    qeuestWSelectListBean.createTime = map['createTime'];
    qeuestWSelectListBean.parent = map['parent'];
    qeuestWSelectListBean.questionTypeList = map['questionTypeList'];
    qeuestWSelectListBean.defaultQ = map['defaultQ'];
    return qeuestWSelectListBean;
  }

  Map toJson() => {
        "id": id,
        "mineId": mineId,
        "questionTitle": questionTitle,
        "questionUid": questionUid,
        "questionDef": questionDef,
        "questionDelete": questionDelete,
        "questContent": questContent,
        "updateDate": updateDate,
        "createTime": createTime,
        "parent": parent,
        "questionTypeList": questionTypeList,
        "defaultQ": defaultQ,
      };
}
